;;; packages.el --- hejia layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: hejia <hejia@lingyue>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

;;; Commentary:

;; See the Spacemacs documentation and FAQs for instructions on how to implement
;; a new layer:
;;
;;   SPC h SPC layers RET
;;
;;
;; Briefly, each package to be installed or configured by this layer should be
;; added to `hejia-packages'. Then, for each package PACKAGE:
;;
;; - If PACKAGE is not referenced by any other Spacemacs layer, define a
;;   function `hejia/init-PACKAGE' to load and initialize the package.

;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so
;;   define the functions `hejia/pre-init-PACKAGE' and/or
;;   `hejia/post-init-PACKAGE' to customize the package as it is loaded.

;;; Code:

(defconst hejia-packages
  '(
    youdao-dictionary
    move-text
    git-gutter
    evil-multiedit
    ;; multiple-cursors
    ;; occur

    )
  )

(defun hejia/init-youdao-dictionary ()
  (use-package youdao-dictionary
    :defer t
    :init
    (spacemacs/set-leader-keys "oy" 'youdao-dictionary-search-at-point+)
    )
)

;; TODO: 键盘选择的区块, 需要设置region. 先用鼠标
(defun hejia/post-init-move-text ()
  (progn
    (move-text-default-bindings))
)

(defun hejia/init-git-gutter ()
  (use-package git-gutter
    :defer t
    :init
    (global-git-gutter-mode +1)
    )
)

(defun hejia/init-evil-multiedit ()
  (use-package evil-multiedit
    :init
    ;; (evil-multiedit-default-keybinds)
    ;; (progn
    ;;   (evil-multiedit-default-keybinds))
    ;; ()
    ;; :config
    ;; (evil-multiedit-default-keybinds)
    )
  )

(defun hejia/post-init-evil-multiedit ()
  (progn
    ;; (evil-multiedit-default-keybinds)
    )
  )
;;; packages.el ends here
